import React, { Component } from 'react';
// import pic from '../../assets/cos.png'
import { connect } from 'react-redux'
class Shopplist extends Component {
    // state={
    //     shopplist:[
    //         {
    //             pic:pic,
    //             name:"COSME DCORTE 黛珂牛油果乳液",
    //             capacity:'150ml',
    //             price:205,

    //         },
    //         {
    //             pic:pic,
    //             name:"COSME DCORTE 黛珂牛油果乳液",
    //             capacity:'150ml',
    //             price:205,

    //         },
    //         {
    //             pic:pic,
    //             name:"COSME DCORTE 黛珂牛油果乳液",
    //             capacity:'150ml',
    //             price:205,

    //         },
    //         {
    //             pic:pic,
    //             name:"COSME DCORTE 黛珂牛油果乳液",
    //             capacity:'150ml',
    //             price:205,

    //         },
    //         {
    //             pic:pic,
    //             name:"COSME DCORTE 黛珂牛油果乳液",
    //             capacity:'150ml',
    //             price:205,

    //         },
    //         {
    //             pic:pic,
    //             name:"COSME DCORTE 黛珂牛油果乳液",
    //             capacity:'150ml',
    //             price:205,

    //         },
            
    //     ]
    // }
    render() {
        console.log(this.props.shopcarlist[0]);
        return (
            <div className='shopplist'>
                {
                    this.props.shopcarlist.map((item,index)=>{
                        return (
                            <div className='shopplist_one' key={index}>
                                <div className='shopplist_one_left'>
                                    <div className='shopplist_one_input'>
                                        <input type="checkbox" name="" id="" />
                                    </div>
                                    <div className='imgbox'>
                                        <img src={item.pic} alt="" />
                                    </div>
                                </div>
                                <div className='shopplist_one_right'>
                                    <p className='name'>{item.name}</p>
                                    <p className='p2'>{}</p>
                                    <div className='p3'>包邮包税</div>
                                    <div className='Preferential'>满200/800,享超值换购</div>
                                    <div className='time'>3天后恢复原价</div>
                                    <div className='money'>
                                        <p>¥{item.salesPrice.value}</p>
                                        <div className='anniu'>
                                            <button>-</button>
                                            <p>1</p>
                                            <button>+</button>
                                        </div>
                                    </div>
                                    <div className='xiangou'>限购8件</div>
                                </div>
                            </div>
                        )
                    })
                }


                
            </div>
        );
    }
}

export default connect(
    (state)=>{
        return {
            "shopcarlist":state.shopcarlist
        }
    },
    (dispatch)=>{
        return {

        }
    }
)(Shopplist);